try:
    file = open('text.txt','r')
    content = file.read()
except FileNotFoundError as e:
    print('文件不存在:',e)
finally:
    print('无论是否发生异常，都会执行此处的代码')
    file.close()